package com.test.application.controller;

import com.test.libary.Service;
import com.test.libary.ServiceConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Import;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Import(ServiceConfiguration.class)
public class DemoController {

    private final Service service;

    @Autowired
    public DemoController(Service service){
        this.service=service;
    }

    @RequestMapping("/")
    public String home(){
        return service.message();
    }
}
